<style>
.{{$template|escape:'html'}}_table1 {
  width: 100%;
}
.{{$template|escape:'html'}}_td1 {
  text-align: left;
  width: 100%;
  padding-bottom: 3px;
  font-weight: bold;
}
.{{$template|escape:'html'}}_td2 {
  height: 22px;
  background-color: #acc8fe;
  padding: 0 25px 0 5px;
  font-weight: bold;
}
.{{$template|escape:'html'}}_text {
  margin-right:10px;
  width: 140px;
  height: 16px;
}
</style>

<script src="jsrequest.php?script={{$template|escape:'html'}}" type="text/javascript"></script>
<script type="text/javascript">
  <!--
    if (document.addEventListener) {
      document.addEventListener('DOMContentLoaded', init, false);
    }
    window.onload = init;

    function init() {
      if (!document.getElementById || !document.createElement || !arguments || arguments.callee._loaded) {
        return;
      }
      arguments.callee._loaded = true;
      var gui = AbsBModel.gui('{{$template|escape:'javascript'}}');
      new HandleBModel(gui, MiscUtils.decode('{{$user|escape:javascript}}'), MiscUtils.decode('{{$date|escape:javascript}}'), MiscUtils.decode('{{$options|escape:javascript}}'), JSON.parse('{{$data|escape:javascript}}'));
    }
  //-->
</script>

<table class="{{$template|escape:'html'}}_table1" cellPadding="0" cellSpacing="0">
  <tr>
    <td class="{{$template|escape:'html'}}_td1">
      <input class="{{$template|escape:'html'}}_text" id="{{$template|escape:'html'}}_name_text" />
    </td>
  </tr>
  <tr>
    <td align="left">
      <input type="button" class="button" id="{{$template|escape:'html'}}_update_button" style="margin-bottom:28px;" value="Update" /></span>
    </td>
  </tr>
  <tr>
    <td class="{{$template|escape:'html'}}_td1">State</td>
  </tr>
  <tr>
    <td align="left">
      <table cellPadding="0" cellSpacing="0">
        <tr>
          <td>
            <table class="tableborder" id="{{$template|escape:'html'}}_states_table" cellPadding="0" cellSpacing="0">
              <tr>
                <td class="{{$template|escape:'html'}}_td2">No.</td>
                <td class="{{$template|escape:'html'}}_td2">Name</td>
                <td class="{{$template|escape:'html'}}_td2">&nbsp</td>
              </tr>
            </table>
            <table style="width:100%">
            <tr>
              <td style="text-align: right;">
                <input type="button" class="button" id="{{$template|escape:'html'}}_addState_button" value="Add State" />
              </td>
            </tr>
          </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="{{$template|escape:'html'}}_td1">Trainsitions</td>
  </tr>
  <tr>
    <td align="left">
      <table cellPadding="0" cellSpacing="0">
        <tr>
          <td align="left">
            <table class="tableborder" id="{{$template|escape:'html'}}_transitions_table" cellPadding="0" cellSpacing="0">
              <tr>
                <td class="{{$template|escape:'html'}}_td2">No.</td>
                <td class="{{$template|escape:'html'}}_td2">Name</td>
                <td class="{{$template|escape:'html'}}_td2">User Type</td>
                <td class="{{$template|escape:'html'}}_td2">Source</td>
                <td class="{{$template|escape:'html'}}_td2">Target</td>
                <td class="{{$template|escape:'html'}}_td2">Day</td>
                <td class="{{$template|escape:'html'}}_td2">&nbsp</td>
              </tr>
            </table>
            <table style="width:100%">
              <tr>
                <td style="text-align: right">
                  <input type="button" class="button" id="{{$template|escape:'html'}}_addTransition_button" value="Add Transition" />
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
